using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Intelsi.DataAcces.Mapping;
using Intelsi.Entity;

namespace Intelsi.DataAcces
{
    public class IntelsiDBContext : DbContext
    {
        static IntelsiDBContext()
        {
            Database.SetInitializer<IntelsiDBContext>(null);
        }

		public IntelsiDBContext()
			: base("Name=IntelsiDBContext")
		{
		}

        public DbSet<Banco> Bancoes { get; set; }
        public DbSet<BancoProvedor> BancoProvedors { get; set; }
        public DbSet<Categoria> Categorias { get; set; }
        public DbSet<DetalleDevolucion> DetalleDevolucions { get; set; }
        public DbSet<DetalleEntradaProducto> DetalleEntradaProductos { get; set; }
        public DbSet<DetallePedido> DetallePedidoes { get; set; }
        public DbSet<Devolucion> Devolucions { get; set; }
        public DbSet<EntradaProducto> EntradaProductos { get; set; }
        public DbSet<Marca> Marcas { get; set; }
        public DbSet<Pedido> Pedidoes { get; set; }
        public DbSet<Producto> Productoes { get; set; }
        public DbSet<Proveedor> Proveedors { get; set; }
        public DbSet<Proyecto> Proyectoes { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Trabajador> Trabajadors { get; set; }
        public DbSet<ubigeo> ubigeos { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new BancoMap());
            modelBuilder.Configurations.Add(new BancoProvedorMap());
            modelBuilder.Configurations.Add(new CategoriaMap());
            modelBuilder.Configurations.Add(new DetalleDevolucionMap());
            modelBuilder.Configurations.Add(new DetalleEntradaProductoMap());
            modelBuilder.Configurations.Add(new DetallePedidoMap());
            modelBuilder.Configurations.Add(new DevolucionMap());
            modelBuilder.Configurations.Add(new EntradaProductoMap());
            modelBuilder.Configurations.Add(new MarcaMap());
            modelBuilder.Configurations.Add(new PedidoMap());
            modelBuilder.Configurations.Add(new ProductoMap());
            modelBuilder.Configurations.Add(new ProveedorMap());
            modelBuilder.Configurations.Add(new ProyectoMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TrabajadorMap());
            modelBuilder.Configurations.Add(new ubigeoMap());
        }
    }
}
